
package com.joysuch.wwyt.datadump.biz.convertor;

import cn.zlg.common.datadump.annotation.DataDumpField;
import cn.zlg.common.datadump.convertor.FieldValueConvert;
import org.springframework.stereotype.Component;

/**
 * 导出时，将判断题答案是否转换为 A，B
 */
@Component
public class ExportEduQuestionJudgeAnswerConvertor implements FieldValueConvert {

    @Override
    public Object convert(Object bean, Object value, DataDumpField dataField) {

        if ("是".equals(value)) {
            return "A";
        } else if("否".equals(value)){
            return "B";
        }
        return value;
    }

}
